package com.qymerge.manage.core.init;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

@Component
public class BeanDefineConfigue implements ApplicationListener<ContextRefreshedEvent> {
	
	//YC:当一个ApplicationContext被初始化或刷新触发 
	@Override
	public void onApplicationEvent(ContextRefreshedEvent event) {
		/*MyLogger.log.debug("YYCC：START:spring初始化开始======================>");
		if (event.getApplicationContext().getParent() == null) {//root application context 没有parent，他就是老大.
			MyLogger.log.debug("YYCC:启动baseDataPublishService的initResourceConfig方法进行参数的初始化======================>");
		} else {
			//为什么会执行两次：请参考博文：http://www.cnblogs.com/yucongblog/p/5437744.html
			MyLogger.log.debug("YYCC:spring初始化时,执行onApplicationEvent:event.getApplicationContext().getParent() != null======================>");
		}
		MyLogger.log.debug("YYCC:END:spring初始化完毕======================>");*/
	}

}
